﻿namespace SpLocalizer.Common.Patterns.Chains
{
    public class Chain<T> : ChainBase<T>
    {
        private readonly IChain<T> _next;
        private readonly T _value;

        public Chain(IChain<T> next, T value)
        {
            _next = next;
            _value = value;
        }

        public Chain(T value) : this(null, value)
        {
        }

        #region Overrides of ChainBase<T>

        public override IChain<T> Next
        {
            get { return _next; }
        }

        public override T Value
        {
            get { return _value; }
        }

        #endregion
    }
}